package connect4client.net.servers;

import java.net.InetAddress;

public class Server {

	protected int port;
	protected InetAddress ip;


	public Server(InetAddress ip, int port) {
		this.ip = ip;
		this.port = port;
	}


	public InetAddress getIp() {
		return ip;
	}


	public int getPort() {
		return port;
	}


	public Server(String ip, int port) {
		try {
			this.ip = InetAddress.getByName(ip);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		this.port = port;
	}


	public String toString() {
		return this.ip + ":" + this.port;
	}

}
